package cn.xwt.weidisk.service;

import cn.xwt.weidisk.mapper.RecycleMapper;
import cn.xwt.weidisk.pojo.dao.RecycleDo;
import cn.xwt.weidisk.pojo.dao.RecycleFileDo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 薛慰涛
 */
public interface RecycleService {

    /**
     * 保存recycle
     * @param recycle uid，fid
     * @return boolean
     */
    Boolean insertRecycle(RecycleDo recycle);

    /**
     * 通过uid查询recycle
     * @param uid 用户id
     * @return List<RecycleDo>
     */
    List<RecycleFileDo> selectRecycleList(Long uid);

    /**
     * 根据id删除recycle
     * @param id rid
     * @param uid uid
     */
    void deleteRecycle(Long id, Long uid);

    /**
     * 根据rid列表删除recycle
     * @param idList 要删除的id列表
     * @param uid 用户id
     */
    void deleteRecycleList(List<Long> idList, Long uid);

    /**
     * 查询所有的recycle列表
     * @return List<RecycleDo>
     */
    List<RecycleDo> selectExpireList();
}
